﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="lgweb.user.login" %>

<%@ Register Src="~/control/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="~/control/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>当事人通道 - 深圳市龙岗区人民法院网站</title>
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="keywords" />
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="description" />
    <link href="/favicon.ico" type="image/x-icon" rel="Bookmark" />
    <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/user/login.css" rel="stylesheet" type="text/css" />
    <script src="/js/common/base.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="g_body">
        <uc1:header ID="header1" runat="server" />
        <div class="g_content">
             <div class="g_box950">
                    <div class="s_title">当前位置：<a href="/index.aspx">首页</a> > 用户登录</div>
                    <div class="s_box">
                        <div class="login_con">
                            <h2>用户登录</h2>
                            <table cellpadding="0" cellspacing="0" class="g_form">
                                <tr>
                                    <th width="70">登录类型：</th>
                                    <td width="340"><input type="radio" id="rdocredentials1" runat="server" name="rdocredentials" checked value="1" onclick="login_set_show('');" />身份证<input type="radio" class="mgl10" id="rdocredentials2" runat="server" name="rdocredentials" value="1"  onclick="login_set_show('');" />护照<input type="radio" class="mgl10" id="rdocredentials3" runat="server" name="rdocredentials" value="2" onclick="login_set_show('ls');"  />律师</td>
                                </tr>
                                <tr>
                                    <th>证件号码：</th>
                                    <td><input type="text" maxlength="20" id="txtLoginCard" class="txt w160" runat="server" /><label class="red">*</label></td>
                                </tr>
                                <tr>
                                    <th>密码：</th>
                                    <td><input type="password" maxlength="20" id="txtLoginPwd" class="txt w160" runat="server"  /><label class="red">*</label></td>
                                </tr>
                                <tr id="tr_text">
                                    <th></th>
                                    <td>如果您是已在本院立案的当事人，首次登录前请激活帐号。激活后输入证件号码及密码进行登录。</td>
                                </tr>
                                <tr>
                                    <th></th>
                                    <td><asp:Button ID="Button1" runat="server" CssClass="btn_gray" Text="登录" 
                                            onclick="Button1_Click" OnClientClick="return CheckInfo();" /><a href="/user/reg.aspx" id="a_reg">用户注册</a><a href="/user/RetrievePassword.aspx" id="a1">找回密码</a></td>
                                </tr>
                                <tr>
                                    <td colspan="2" id="spMessage" runat="server" class="red"></td>
                                </tr>
                            </table>
                        </div> 
                        <div class="h-line left"></div>   
                        <div class="login_con">
                            <h2>帐号激活</h2>
                            <table cellpadding="0" cellspacing="0" class="g_form">
                                <tr>
                                    <th width="70">证件类型：</th>
                                    <td><input type="radio" name="rdoactivation" id="rdoactivation1" runat="server" checked  />身份证<input type="radio" class="mgl10" name="rdoactivation" id="rdoactivation2" runat="server"  />护照</td>
                                </tr>
                                <tr>
                                    <th>证件号码：</th>
                                    <td><input type="text" maxlength="20" id="txtActiveCard" runat="server" class="txt w160"  /><label class="red">*</label></td>
                                </tr>
                                <tr>
                                    <th></th>
                                    <td>在法院立案的当事人，第一次登录时需先激活帐号。</td>
                                </tr>
                                <tr>
                                    <th></th>
                                    <td><%--<input type="button"  value="激活" onclick="window.location.href = '/user/AccountActivation.aspx';"  class="btn_gray"  />--%><asp:Button 
                                            ID="Button2" OnClientClick="return checkactive();" runat="server" 
                                            Text="激活" class="btn_gray" onclick="Button2_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" id="tdMessages" runat="server" class="red"></td>
                                </tr>
                            </table>
                        </div>   
                    </div>
                </div>
        </div>
        <uc2:footer ID="footer1" runat="server" />
   </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function login_set_show(id) {
        if (id == "ls") {
            document.getElementById("tr_text").className = "none";
            document.getElementById("a_reg").className = "none";
        } else {
            document.getElementById("tr_text").className = "";
            document.getElementById("a_reg").className = "";
        }
    }

    function onHref() {
        var aEls = document.getElementsByName("rdocredentials");
        for (var i = 0; i < aEls.length; i++) {
            if (aEls[i].checked) {
                if (aEls[i].value == "1") {
                    window.location.href = "/user/index.aspx";
                } else {
                    window.location.href = "/lawyer/index.aspx";
                }
            }
        }

    }

    function checkactive() {
        var sName = document.getElementById("txtActiveCard").value;
        if (sName.length<=0) {
            alert("证件号码不能为空！");
            return false;
        }

        return true;
    }

    function CheckInfo() {
        var sName = document.getElementById("txtLoginCard").value;
        if (sName.length <= 0) {
            alert("证件号码不能为空！");
            return false;
        }

        var sPassword = document.getElementById("txtLoginPwd").value;
        var re1 = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re1.test(sPassword)) {
            alert("密码必须为大于5小于15个字符.不能使用特殊字符！");
            return false;
        }
        return true;
    }
</script>
